<?php

namespace App\Model;
use Hyperf\Database\Model\SoftDeletes;

class Role extends Model {
    protected $table = 'role';
    use SoftDeletes;

    protected $fillable = [
        'name',
    ];

    public function menus() {
        return $this->belongsToMany(AdminMenu::class, 'role_menu', 'role_id', 'menu_id');
    }
}